import 'package:get/get.dart';

import '../utils/state_controller.dart';

class GetMainLogic extends GetxController {
  RxInt pageIndex = 0.obs;

  late StateController stateController;

  @override
  void onInit() async {
    super.onInit();

    stateController = Get.find();
    stateController.eventBus.on<UserTabbarChangeEvent>().listen((event) {
      // print('event.index: ${event.index}');
      pageIndex.value = event.index;
    });


  }

  void pageChange(int index,
      [int? workbenchFirstTabIndex, int? workbenchSecondTabIndex]) {
    pageIndex.value = index;
  }
}
